﻿<Window x:Class="BinaryTimes.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:BinaryTimesCore;assembly=BinaryTimesCore"
        Width="500"
        Height="400"
        Closed="Window_Closed"
        Loaded="MainWindow_Loaded"
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        Topmost="True"
        WindowStyle="None">
    <Window.Background>
        <ImageBrush ImageSource="background.png" Stretch="Fill" />
    </Window.Background>
    <Window.Resources>
        <Color x:Key="InitColor">#fff</Color>
        <Duration x:Key="InitDuration">0:0:0.9</Duration>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="Loaded">
            <BeginStoryboard>
                <Storyboard Name="storyboardInit" Completed="storyboardInit_Completed">

                    <ColorAnimation Duration="{StaticResource InitDuration}"
                                    From="{StaticResource InitColor}"
                                    Storyboard.TargetName="overlayBorder"
                                    Storyboard.TargetProperty="(Border.Background).Color"
                                    To="Transparent" />
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Window.Triggers>
    <Grid>
        <my:BinaryClock x:Name="binaryClock1">
            <my:BinaryClock.HourTemplate>
                <DataTemplate>
                    <TextBlock FontFamily="Alteran"
                               FontSize="40"
                               Foreground="#80ffffff"
                               Text="H"
                               TextAlignment="Center">
                        <TextBlock.Effect>
                            <BlurEffect Radius="3" />
                        </TextBlock.Effect>
                    </TextBlock>
                </DataTemplate>
            </my:BinaryClock.HourTemplate>

            <my:BinaryClock.MinuteTemplate>
                <DataTemplate>
                    <TextBlock FontFamily="Alteran"
                               FontSize="40"
                               Foreground="#80ffffff"
                               Text="M"
                               TextAlignment="Center">
                        <TextBlock.Effect>
                            <BlurEffect Radius="3" />
                        </TextBlock.Effect>
                    </TextBlock>
                </DataTemplate>
            </my:BinaryClock.MinuteTemplate>

            <my:BinaryClock.SecondTemplate>
                <DataTemplate>
                    <TextBlock FontFamily="Alteran"
                               FontSize="40"
                               Foreground="#80ffffff"
                               Text="S"
                               TextAlignment="Center">
                        <TextBlock.Effect>
                            <BlurEffect Radius="3" />
                        </TextBlock.Effect>
                    </TextBlock>
                </DataTemplate>
            </my:BinaryClock.SecondTemplate>
        </my:BinaryClock>

        <Canvas Name="canvas" />

        <Border Name="overlayBorder"
                Background="Transparent"
                BorderBrush="Transparent"
                BorderThickness="0" />
    </Grid>
</Window>
